home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / spar372.zip / COPYBUFF.DOC next >
Text File  |  1993-01-11  |  3KB  |  98 lines

  1. TABLE OF CONTENTS
  2.  
  3. any_sana2_protocol/CopyFromBuff
  4. any_sana2_protocol/CopyToBuff
  5. any_sana2_protocol/CopyFromBuff               any_sana2_protocol/CopyFromBuff
  6.  
  7.    NAME
  8.     CopyFromBuff -- Copy n bytes from an abstract data structure.
  9.  
  10.    SYNOPSIS
  11.     success = CopyFromBuff(to, from, n)
  12.     d0               a0  a1    d0
  13.  
  14.     BOOL CopyToBuff(VOID *, VOID *, ULONG);
  15.  
  16.    FUNCTION
  17.     This function copies 'n' bytes of data in the abstract data structure
  18.     pointed to by 'from' into the contigous memory pointed to by 'to'.
  19.     'to' must contain at least 'n' bytes of usable memory or innocent
  20.     memory will be overwritten.
  21.  
  22.    INPUTS
  23.     to        - pointer to contiguous memory to copy to.
  24.     from        - pointer to abstract structure to copy from.
  25.     n        - number of bytes to copy.
  26.  
  27.    RESULT
  28.     success        - TRUE if operation was successful, else FALSE.
  29.  
  30.    EXAMPLE
  31.  
  32.    NOTES
  33.     This function must be callable from interupts.  In particular, this
  34.     means that this function may not directly or indirectly call any
  35.     system memory functions (since those functions rely on Forbid() to
  36.     protect themselves) and that  you must not compile this function
  37.     with stack checking enabled.  See the RKM:Libraries Exec:Interupts
  38.     chapter for more details on what is legal in a routine called from
  39.     an interupt handler.
  40.  
  41.     'C' programmers should not compile with stack checking (option '-v'
  42.     in SAS) and should geta4() or __saveds.
  43.  
  44.    BUGS
  45.  
  46.    SEE ALSO
  47.  
  48. any_sana2_protocol/CopyToBuff                   any_sana2_protocol/CopyToBuff
  49.  
  50.    NAME
  51.     CopyToBuff -- Copy n bytes to an abstract data structure.
  52.  
  53.    SYNOPSIS
  54.     success = CopyToBuff(to, from, n)
  55.     d0             a0  a1    d0
  56.  
  57.     BOOL CopyToBuff(VOID *, VOID *, ULONG);
  58.  
  59.    FUNCTION
  60.     This function first does any initialization and/or allocation
  61.     required to prepare the abstract data structure pointed at by 'to'
  62.     to be filled with 'n' bytes of data from 'from'.  It then executes
  63.     the copy operation.
  64.  
  65.     If, for example, there is not enough memory available to prepare
  66.     the abstract data structure, the call is failed and FALSE is returned.
  67.  
  68.     The buffer management scheme should be such that any memory needed
  69.     to fulfill CopyToBuff() calls is already allocated from the system
  70.     before the call to CopyToBuff() is made.
  71.  
  72.    INPUTS
  73.     to        - pointer to abstract structure to copy to.
  74.     from        - pointer to contiguous memory to copy from.
  75.     n        - number of bytes to copy.
  76.  
  77.    RESULT
  78.     success        - TRUE if operation was successful, else FALSE.
  79.  
  80.    EXAMPLE
  81.  
  82.    NOTES
  83.     This function must be callable from interupts.  In particular, this
  84.     means that this function may not directly or indirectly call any
  85.     system memory functions (since those functions rely on Forbid() to
  86.     protect themselves) and that you must not compile this function
  87.     with stack checking enabled.  See the RKM:Libraries Exec:Interupts
  88.     chapter for more details on what is legal in a routine called from
  89.     an interupt handler.
  90.  
  91.     'C' programmers should not compile with stack checking (option '-v'
  92.     in SAS) and should geta4() or __saveds.
  93.  
  94.    BUGS
  95.  
  96.    SEE ALSO
  97.  
  98.